package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the TM_INST_SIR database table.
 * 
 */
@Entity
@Table(name="TM_INST_SIR")
public class TmInstSir implements Serializable {
	private static final long serialVersionUID = 1L;
	private TmInstSirPK id;
	private String agntSync;
	private String nombreInst;
	private String siglas;
	private Date tsUltSync;
	private OficRegistral oficRegistral;
	private PeJuri peJuri;

    public TmInstSir() {
    }


	@EmbeddedId
	public TmInstSirPK getId() {
		return this.id;
	}

	public void setId(TmInstSirPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="NOMBRE_INST", nullable=false, length=50)
	public String getNombreInst() {
		return this.nombreInst;
	}

	public void setNombreInst(String nombreInst) {
		this.nombreInst = nombreInst;
	}


	@Column(length=20)
	public String getSiglas() {
		return this.siglas;
	}

	public void setSiglas(String siglas) {
		this.siglas = siglas;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to OficRegistral
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="OFIC_REG_ID", referencedColumnName="OFIC_REG_ID", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="REG_PUB_ID", referencedColumnName="REG_PUB_ID", nullable=false, insertable=false, updatable=false)
		})
	public OficRegistral getOficRegistral() {
		return this.oficRegistral;
	}

	public void setOficRegistral(OficRegistral oficRegistral) {
		this.oficRegistral = oficRegistral;
	}
	

	//bi-directional many-to-one association to PeJuri
    @ManyToOne
	@JoinColumn(name="PE_JURI_ID")
	public PeJuri getPeJuri() {
		return this.peJuri;
	}

	public void setPeJuri(PeJuri peJuri) {
		this.peJuri = peJuri;
	}
	
}